package cn.edu.sdjzu.controller;

import cn.edu.sdjzu.entity.Person;
import cn.edu.sdjzu.service.IPersonService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PersonController {
    @Resource
    private IPersonService personService;

    @GetMapping("/person")
    public List<Person> getAll() {
        return personService.findAll();
    }
}
